<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/8/2
  Time: 19:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
  <head>
    <title>SeperatePage</title>
  </head>
  <body>
  <%--${requestScope.users}--%>
  <table border="1px" width="900px" cellpadding="10px" cellspacing="0px">
    <!--表头-->
    <tr>
      <td style="font-size: inherit">Id</td>
      <td style="font-size: inherit">name</td>
      <td style="font-size: inherit">age</td>
    </tr>
    <!--找到数据将数据放入表格内-->
    <c:forEach items="${pageBean.users}" var="user">
      <tr>
        <td>${user.id}</td>
        <td>${user.name}</td>
        <td>${user.age}</td>
      </tr>
    </c:forEach>
  </table>


  <div>

    <c:if test="${pageBean.currentPage>1}">
      <a href="/getUser?pageItem=${pageBean.pageItem}&currentPage=${pageBean.currentPage-1}">上一页</a>
    </c:if>

    第<span>${pageBean.currentPage}</span>页
    <c:if test="${pageBean.currentPage < pageBean.pageCount}">
      <a href="/getUser?pageItem=${pageBean.pageItem}&currentPage=${pageBean.currentPage+1}">下一页</a>
    </c:if>
  </div>
  </body>
</html>
